<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

</body>
<script>
    var a = Math.random()*899;
    var b = Math.ceil(a);
    var c = 100 + b;
    console.log(c);

    var d = Math.floor(c / 100);
    console.log(d);

    var e = Math.floor(c / 10 - d * 10);
    console.log(e);

    var f = Math.floor(c%10);
    console.log(f);
</script>
</html>